<?php
use HyperfStore\Route\Route;

Route::post('/login', 'IndexController@login');
        
Route::middleware('auth', 'auth_admin')->group(function () {
    Route::get('/info', 'IndexController@info');
    
    Route::get('/config', 'ConfigController@index');
    Route::put('/config', 'ConfigController@update');
    
    Route::post('/upload', 'IndexController@upload');
    
    Route::get('/admin', 'AdminController@index');
    Route::post('/admin', 'AdminController@create');
    Route::put('/admin/{id}', 'AdminController@update');
    Route::delete('/admin/{id}', 'AdminController@delete');
    
    Route::get('/daili', 'DailiController@index');
    Route::post('/daili', 'DailiController@create');
    Route::put('/daili/{id}', 'DailiController@update');
    Route::delete('/daili/{id}', 'DailiController@delete');
    
    Route::get('/level', 'LevelController@index');
    Route::put('/level/{id}', 'LevelController@update');
    
    Route::get('/shop', 'ShopController@index');
    Route::get('/shop/{id}', 'ShopController@status');
    Route::get('/shop/money/{id}', 'ShopController@money');
    Route::post('/shop/{id}', 'ShopController@info');
    
    Route::get('/user', 'UserController@index');
    Route::put('/user/{id}', 'UserController@update');
    Route::post('/user/money/make/{id}', 'UserController@moneyMake');
    Route::post('/user/money/discount/{id}', 'UserController@moneyDiscount');
    Route::get('/user/money/user/min', 'UserController@moneyUserMin');
    Route::post('/user/money/user/min/red', 'UserController@moneyUserMinRed');
    Route::get('/user/log', 'UserController@log');
    Route::get('/user/pay', 'UserController@pay');
    Route::get('/user/transfer', 'UserController@transfer');
    
    Route::get('/user/integral', 'UserIntegralController@index');
    Route::get('/user/integral/reboot/{id}', 'UserIntegralController@reboot');
    
    Route::get('/product/menu', 'ProductMenuController@index');
    Route::post('/product/menu', 'ProductMenuController@create');
    Route::put('/product/menu/{id}', 'ProductMenuController@update');
    Route::delete('/product/menu/{id}', 'ProductMenuController@delete');
    
    Route::get('/product', 'ProductController@index');
    Route::post('/product', 'ProductController@create');
    Route::put('/product/{id}', 'ProductController@update');
    Route::delete('/product/{id}', 'ProductController@delete');
    
    Route::get('/order', 'OrderController@index');
    Route::post('/order/express/{id}', 'OrderController@express');
    
    Route::get('/total/user', 'TotalController@user');
    Route::get('/total/user/pay', 'TotalController@userPay');
    Route::get('/total/user/log', 'TotalController@userLog');
    Route::get('/total/order/goods', 'TotalController@orderGoods');
});